package edu.zut.cs.software.cms.module.attendance.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

import edu.zut.cs.software.cms.base.domain.BaseEntity;
/**
 * 
 * @author 清风依旧
 *
 */
@Entity
@Table(name = "T_ATTENDANCERATE")
public class AttendanceRate extends BaseEntity<Long> {
	private static final long serialVersionUID = -3199029100807028476L;
	/**
	 * Number of attendance
	 */
	@Column
	int attendanceNumber;
	/**
	 * attendance rate
	 */
	@Column
	float attendanceRate;
	/**
	 * attendance of name
	 */
	@Column
	String name;
	/**
	 * total attendance times
	 */
	@Column
	int total;
	/**
	 * 
	 */
	@ManyToOne
	@JoinColumn(name = "ATTENDANCE_NAME")
	@JsonIgnore
	Attendance attendance;

	/**
	 * @return the attendance
	 */
	public Attendance getAttendance() {
		return attendance;
	}

	/**
	 * @param attendance the attendance to set
	 */
	public void setAttendance(Attendance attendance) {
		this.attendance = attendance;
	}

	/**
	 * @return the attendanceNumber
	 */
	public int getAttendanceNumber() {
		return attendanceNumber;
	}

	/**
	 * @return the attendanceRate
	 */
	public float getAttendanceRate() {
		return attendanceRate;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the total
	 */
	public int getTotal() {
		return total;
	}

	/**
	 * @param attendanceNumber the attendanceNumber to set
	 */
	public void setAttendanceNumber(int attendanceNumber) {
		this.attendanceNumber = attendanceNumber;
	}

	/**
	 * @param attendanceRate the attendanceRate to set
	 */
	public void setAttendanceRate(float attendanceRate) {
		this.attendanceRate = attendanceRate;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @param total the total to set
	 */
	public void setTotal(int total) {
		this.total = total;
	}

}